<?php     

//header("Cache-Control: no-cache, must-revalidate");
//header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");



define('versionDmconnex','2.5.1');

require_once('library/database/cmc_db_config.inc.php'); // configuration class (parent)
require_once('library/database/cmc_db_recordset.inc.php'); // recordset class (sub)
require_once('library/database/cmc_db_execute.inc.php'); // execute class (sub)  
require_once('library/database/memcacheclass.php'); // execute class (sub)  
require_once('library/url/class_uri.php'); // uri
require_once('includes/class/banner.php'); // uri  
require_once('assets/configdata.php'); // uri 
require_once('includes/model/model.php'); // uri 
require_once('assets/define.php'); // uri  
//require_once("library/plugin/SBBCodeParser-master/SBBCodeParser.php");
//require_once("library/plugin/jbbcode/Parser.php");
require_once("library/general_pi.php");


require_once pluginpath.'/facebook-php-sdk-v4-4.0-dev/autoload.php';
//require 'functions.php';  





$arrayconfig=json_decode(file_get_contents("assets/config.json"));
$arrayconfig=object_to_array($arrayconfig);



 $logcheck=1;


 $class_uri =new class_uri($arrayconfig); 
 $info=$class_uri->getarraydata();
 
$memcache =new memcacheclass();
$memcache->connect();
$db_exec = new db_execute(); 
$db_exec->set_host(db_host);
$db_exec->set_user(db_user);
$db_exec->set_pass(db_pass); 
$db_exec->set_database(db_name); 
//exit;


 if(strpos($_SERVER['REQUEST_URI'],'.jpg')!==false||strpos($_SERVER['REQUEST_URI'],'.png')!==false||strpos($_SERVER['REQUEST_URI'],'.gif')!==false||strpos($_SERVER['REQUEST_URI'],'.JPG')!==false)
        {
        if(strpos($_SERVER['REQUEST_URI'],'/bird.jpg')!==false)
        {
        $db_exec->get_connect();
$arraydata2['ip']=$_SERVER['REMOTE_ADDR'];
$arraydata2['agent']=$_SERVER['HTTP_USER_AGENT'];
$arraydata2['userid']=$_COOKIE['userid'];
$arraydata2['get']=json_encode($_GET);
$arraydata2['post']=json_encode($_POST);
$arraydata2['createdate']=date("Y-m-d H:i:s");
$arraydata2['lang']=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$arraydata2['path']=$_SERVER['REQUEST_URI'];
$db_exec->db_set($arraydata2,'tb_stat_data_view2');
$db_exec->closedb(); 
        
        }
            
           header( "location: ".baseinfo."/imglevel/no_image.gif" ); 
           exit;
        }
        else
        {
        if(array_search('database17-03-2557.sql', $arrayconfig['database']))
{
//if(strpos($_SERVER['REQUEST_URI'],'ajax')===false)
//{


        $db_exec->get_connect();
$arraydata2['ip']=$_SERVER['REMOTE_ADDR'];
$arraydata2['agent']=$_SERVER['HTTP_USER_AGENT'];
$arraydata2['userid']=$_COOKIE['userid'];
$arraydata2['get']=json_encode($_GET);
$arraydata2['post']=json_encode($_POST);
$arraydata2['createdate']=date("Y-m-d H:i:s");
$arraydata2['lang']=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$arraydata2['path']=$_SERVER['REQUEST_URI'];
$db_exec->db_set($arraydata2,'tb_stat_data_view');
$db_exec->closedb(); 

//}
}
        
        
        }

require_once('includes/class/'.$info['class'].'.php'); // execute class (sub)    


?>
